package org.game.obj.unit;

public class GWPeasant extends GWUnit {

	public static final int NONE = 0;
	public static final int IRON_ORE = 2;
	public static final int WOOD = 4;
	public static final int FOOD = 8;

	public static final int FOOD_COST = 40;
	public static final int WOOD_COST = 20;
	public static final int STEEL_COST = 0;
	
	private boolean loaded;
	private int resources;
	
	public GWPeasant() {
		maxLife = 100;
		actLife = maxLife;
		
		armor = 10;
		
		minDmg = 15;
		maxDmg = 22;
	}
	
	public void gatherResources(int type) {
		if(loaded) return;
		resources = type;
		loaded = true;
	}
	
	public int bringResources() {
		if(!loaded) return NONE;
		int type = resources;
		resources = NONE;
		loaded = false;
		return type;
	}
	
	public int getFoodCost() {
		return FOOD_COST;
	}
	
	public int getWoodCost() {
		return WOOD_COST;
	}
	
	public int getSteelCost() {
		return STEEL_COST;
	}
	
	public boolean isLoaded() {
		return loaded;
	}
}
